--摸鱼时间
local moyushijian = fk.CreateSkill {
    name = "mcdh_moyushijian",
    tags = {Skill.Compulsory}
}

local U = require "packages/utility/utility"
local lib = require "packages/mcdh/lib"

moyushijian:addEffect('filter',{
    card_filter = function(self, to_select, player)
        return player:hasSkill(self) and (to_select.trueName == "slash"  or to_select.sub_type == Card.SubtypeWeapon) and
                table.contains(player.player_cards[Player.Hand], to_select.id) and player:getMark("#mcdh_moyushijian-turn") < 1
    end,
    view_as = function(self, to_select)
        local card = Fk:cloneCard(to_select.trueName == "slash" and "jink" or "analeptic", to_select.suit, to_select.number)
        card.skillName = self.name
        return card
    end,
})

moyushijian:addEffect(fk.CardUseFinished,{
    can_refresh = function(self, event, target, player, data)
        return player:hasSkill(self) and data.card.is_damage_card
    end,
    on_refresh = function(self, event, target, player, data)
        local room = player.room
        room:setPlayerMark(player, "#mcdh_moyushijian-turn",1)
    end,
})

Fk:loadTranslationTable {
    ["mcdh_moyushijian"] = "摸鱼时间",
    [":mcdh_moyushijian"] = "锁定技，若当前回合没有伤害牌结算完成，你手牌中的：【杀】视为【闪】，武器牌视为【酒】。"
}

return moyushijian